package com.ztjy.repository.biz.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ztjy.bean.Allkc;
import com.ztjy.repository.biz.AllkcBiz;
import com.ztjy.repository.dao.AllkcDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AllkcBizImpl implements AllkcBiz {
    @Autowired
    private AllkcDao adao;

    @Override
    public PageInfo<Allkc> findAllPage(Allkc allkc, Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<Allkc> allPage = adao.findAllPage(allkc);
        PageInfo<Allkc> pageInfo=new PageInfo<Allkc>(allPage);
        return pageInfo;
    }
}
